package com.ssy.lingxi.platform.template.service.repository;

import com.ssy.lingxi.platform.template.service.entity.door.MemberLogistics;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MemberLogisticsRepository extends JpaRepository<MemberLogistics, Long> {

    MemberLogistics findByMemberIdAndRoleId(Long memberId, Long roleId);

    List<MemberLogistics> findByRoleId(Long roleId);

    Page<MemberLogistics> findAllByIdNotInAndMemberNameContains(List<Long> logisticsIdList, String memberName, Pageable pageable);

    Page<MemberLogistics> findAllByIdNotIn(List<Long> storeIdList, Pageable pageable);

    Page<MemberLogistics> findAllByIdIn(List<Long> storeIdList, Pageable of);

    List<MemberLogistics> findAllByIdIn(List<Long> storeIdList);
}
